<link rel="stylesheet" type="text/css" href="<?=base_url('administrator.users')?>styles/user.css">
<form method="post" action="<?=site_url('admin/contents.contents.delete_all')?>" name="frm_contents" id="frm_contents">
<input type="hidden" name="act" id="act" value="delete_all" />
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <!-- top main-->
  <tr>
    <td height="31">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td style="background:url(<?=base_url('home')?>images/top_left.gif) no-repeat; width:14px; height:31px;"></td>
            <td valign="middle" class="customer_list_head">
			<div class="customer_icon">Email Templates Management</div>			
			<div class="customer_tab"><a href="<?=site_url('admin/users')?>" title="User"><img src="<?=base_url('users')?>images/{img_user}" alt="User" /></a>
			<a href="<?=site_url('admin/parameters')?>" title="Parameters"><img style="padding-left:10px" src="<?=base_url('users')?>images/{img_parameters}" alt="Parameters" /></a>
			<a href="<?=site_url('admin/email_templates')?>" title="Email Templates"><img style="padding-left:10px" src="<?=base_url('users')?>images/{img_email}" alt="Email Templates" /></a>
			<a href="<?=site_url('admin/vehicles')?>" title="Vehicles"><img style="padding-left:10px" src="<?=base_url('users')?>images/{img_vehicle}" alt="Vehicles" /></a>
			<a href="<?=site_url('admin/vehicles.trailers')?>" title="Trailers"><img style="padding-left:10px" src="<?=base_url('users')?>images/{img_trailer}" alt="Trailers" /></a>
            <a href="<?=site_url('admin/vehicles.drivers')?>" title="Drivers"><img style="padding-left:10px" src="<?=base_url('users')?>images/{img_driver}" alt="Drivers" /></a>
			<a href="<?=site_url('admin/zone_postcodes.zone_postcodes')?>" title="Cost"><img style="padding-left:10px" src="<?=base_url('users')?>images/{img_cost}" alt="Cost" /></a>
            <a href="<?=site_url('admin/loggings')?>" title="Logging"><img style="padding-left:10px" src="<?=base_url('users')?>images/{img_logging}" alt="Logging" /></a>
            <a href="<?=site_url('admin/dashboard.dashboard.dashlets')?>" title="Dashboard"><img style="padding-left:10px" src="<?=base_url('users')?>images/{img_dashlet}" alt="Dashboard" /></a>	</div>
			</td>
            <td style="background-color:#000; height:31px; vertical-align:middle;text-align:right;font-weight:bold;">
            <?if(empty($no_permisson)){?>
            <a href="#" title="Add New Templates" style="color:white;text-decoration:none" onclick="common.go_page('admin/email_templates.email_templates.add_new/')"><div class="icon_add">Add</div></a>
            <?}?>
            </td>
            <td style="background:url(<?=base_url('home')?>images/top_right.gif) no-repeat; width:14px; height:31px;"></td>
          </tr>
        </table>
    </td>
  </tr>
  <!-- end top main-->
  <!-- main content-->
  <tr>
    <td style="background:white;">
      <div class="scrollTableContainer" style="height:400px;">
        <?if(isset($no_permisson) && $no_permisson==1){?>
          <p style="text-align:center"><span class="error_msg"><?=msg_no_permission()?></span></p>
        <?}else{?>
        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="dataTable">
          <thead id="mythead">
          <tr class="table_header">
            <td width="35%"><nobr>{subjectTX}</nobr></td>
            <td class="table_divider">&nbsp;</td>
            <td width="50%">{bodyTX}</td>
            <td class="table_divider">&nbsp;</td>
            <td width="80"><nobr>Action</nobr></td>
            <td width="20">&nbsp;</td>
          </tr>
          </thead>
          <tbody style="vertical-align:middle;">
          <?$i=1;foreach($templates as $t){?>
		  <tr class="<?=($i==1)?' tr_odd':''?>">
			<td align="left" style="padding-left:20px;"><?=h($t->subject)?></td>
			<td>&nbsp;</td>
			<td align="left"><?=$t->body?></td>
			<td>&nbsp;</td>
			<td align="center">
				<a href="<?=site_url('admin/email_templates.email_templates.edit/'.$t->id)?>" title="Edit this item"><div class="edit_icon">|</div></a>
				<a href="#" onclick="common.del(<?=$t->id?>,'admin/email_templates.email_templates.delete' , '<?=lang("_confirm_delete")?>')" title="Delete this item"><div class="delete_icon"></div></a>
			</td>
			<td>&nbsp;</td>
		  <tr>
		  <?$i=-$i;}?>		    
          </tbody>
        </table>
        <?}?>
      </div>
    </td>
  </tr>
  <!-- end main content-->
  <!-- bottom main -->
  <tr>
    <td height="36">
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
    	  <tr>
            <td style="background:url(<?=base_url('home')?>images/bottom_left.gif) no-repeat; width:14px; height:36px;"><nobr>&nbsp;&nbsp;&nbsp;&nbsp;</nobr></td>
            <td style="background-color:#000; width:99%; height:36px;"></td>
            <td style="background:url(<?=base_url('home')?>images/bottom_right.gif) no-repeat; width:14px; height:36px;"><nobr>&nbsp;&nbsp;&nbsp;&nbsp;</nobr></td>
          </tr>
		</table>
   	</td>
  </tr>
  <!-- end bottom main -->
</table>
